import request from '@/utils/request'

const api_name = '/admin/product/brand'

//根据partnerId获取下级菜单
export const findByPage = (page,limit) =>{
    return request({
        url : `${api_name}/${page}/${limit}`,
        method : 'get',
    })
}
//进行品牌的添加
export const SaveBrand = (data) => {
    return request({
        url: `${api_name}/saveBrand`,
        method: 'post',
        data
    })
}

// 根据id删除品牌
export const DeleteBrandById = id => {
    return request({
      url: `${api_name}/deleteById/${id}`,
      method: 'delete',
    })
}

// 修改信息
export const UpdateBrandById = brand => {
    return request({
        url: `${api_name}/updateById`,
        method: 'put',
        data: brand,
    })
}
// 查询所有的品牌数据
export const FindAllBrand = () => {
    return request({
      url: `${api_name}/findAll`,
      method: 'get',
    })
}